Skip to content

feat(gen) add Dockerfile and docker-compose.yml support #938

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

kennu
Copy link

@kennu kennu commented Apr 20, 2015

Add support to run generated Angular-Fullstack applications as Docker containers by including
Dockerfile, docker-compose.yml and .dockerignore. When the application is built with grunt
build, these files are copied to the dist directory. The Docker container can then be built
and started there with the "docker-compose up" command. When Mongoose is used, Docker Compose
will also launch a MongoDB container, eliminating the need to install MongoDB on the local
machine. Note that Docker and Docker Compose must be installed for Docker support to work.
They are available on Linux, OS X and Windows.

@Awk34
Copy link
Member

Awk34 commented Aug 19, 2015

@kennu have time to re-visit this?

@Awk34 Awk34 added this to the 3.2.0 milestone Aug 19, 2015
@kingcody
Copy link
Member

It would be nice if we could deploy a docker image from a development repo. For instance you could use an automated build on the docker hub and point it to your project's git repo. However we would need a more complex dockerfile like the one I posted here. The difference is that setup builds the entire project in the docker image and then sets it up for production use.

Pros:

  • Consistent build environment
  • Build directly from the source repo

Cons:

  • Larger docker images (will contain build deps)

+ 2¢

@kennu kennu force-pushed the canary branch 2 times, most recently from 1809723 to 44c946a Compare August 20, 2015 11:03
@kennu
Copy link
Author

kennu commented Aug 20, 2015

Hi guys, I rebased the changes but still need to fix something to pass the tests.

Add support to run generated Angular-Fullstack applications as Docker containers by including
Dockerfile, docker-compose.yml and .dockerignore. When the application is built with grunt
build, these files are copied to the dist directory. The Docker container can then be built
and started there with the "docker-compose up" command. When Mongoose is used, Docker Compose
will also launch a MongoDB container, eliminating the need to install MongoDB on the local
machine. Note that Docker and Docker Compose must be installed for Docker support to work.
They are available on Linux, OS X and Windows.
@kennu
Copy link
Author

kennu commented Aug 20, 2015

Now the tests pass, but for some reason I was unable to add a new test that would specify docker: true and generate Dockerfile and other files. The generator just ignored the setting.

@@ -0,0 +1,4 @@
# Production Dockerfile - Used in the dist directory after grunt build
FROM node:0.12-onbuild
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't be using Node < 4

@kennu
Copy link
Author

kennu commented May 11, 2016

Sorry, I'm not really using Docker any more for this kind of projects so I can't put much effort into this. (The original pull request was made over a year ago.)

@Awk34
Copy link
Member

Awk34 commented May 11, 2016

@kennu yeah I feared that, this PR has been open for a long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants